package cn.gjxblog.web.servlet.mvc.demo1.controller;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * RequestMappingHandlerMapping
 */

@Component
@RequestMapping("/hello")
public class HelloController {

    public static Log logger = LogFactory.getLog(HelloController.class);

    @RequestMapping("/test")
    @ResponseBody
    public String hello(){
        System.out.println("this is test");
        logger.info("this is test");
        return "hello world";
    }



}
